package com.yunchao.feature.lock.presentation.screen

import android.os.Bundle
import android.view.View
import by.kirich1409.viewbindingdelegate.viewBinding
import com.yunchao.feature.base.presentation.activity.BaseFragment
import com.yunchao.feature.base.presentation.ext.navigateSafe
import com.yunchao.feature.base.presentation.ext.setDebouncedClickListener
import com.yunchao.feature.lock.R
import com.yunchao.feature.lock.databinding.FragmentLockOperationBinding

internal class LockOperationFragment : BaseFragment(R.layout.fragment_lock_operation) {

    private val binding: FragmentLockOperationBinding by viewBinding<FragmentLockOperationBinding>()

    override fun initView(view: View, savedInstanceState: Bundle?) {
        binding.apply {
            lockLogisticsBtn.setDebouncedClickListener {
                navigateSafe(LockOperationFragmentDirections.actionLockOperationFragmentToLockLogisticsFragment())
            }
            lockLogBtn.setDebouncedClickListener {
                navigateSafe(LockOperationFragmentDirections.actionLockOperationFragmentToLockLogFragment())
            }

            lockCleanBtn.setDebouncedClickListener {
                navigateSafe(LockOperationFragmentDirections.actionLockOperationFragmentToLockCleanFragment())
            }

            lockRecoveryBtn.setDebouncedClickListener {
                navigateSafe(LockOperationFragmentDirections.actionLockOperationFragmentToLockRecoveryFragment())
            }
        }
    }
}